<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>上传资料</title>
    <!--bootstrap-select  css文件-->
    <link rel="stylesheet" type="text/css" href="js/bootstrapselect/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="js/bootstrapselect/css/bootstrap-select.css"/>
    <!--日期  css文件-->
    <link rel="stylesheet" type="text/css" href="js/datepicker/css/bootstrap-datepicker.css">
    <!--弹窗 css文件-->
    <link rel="stylesheet" type="text/css" href="js/layer/layer.css">
    <!--图片点击放大  css文件-->
    <link rel="stylesheet" href="js/viewer/css/viewer.min.css">
    <!--主要css样式-->
    <link rel="stylesheet" type="text/css" href="css/models.css">
    <style>
        .addList li .bootstrap-select.btn-group:not(.input-group-btn), .addList li .bootstrap-select.btn-group[class*="col-"] {
            width: 31%;
        }
        .addList li input[type="text"], .addList li input[type="password"] {
            width:31%;
        }
        .addList li {
            margin-bottom: 21px;
        }
        .filePhoto, .filePhoto-show{
            overflow:hidden;
        }
        .img-name-p{
            color:#333333;
            overflow:hidden;
            text-overflow:ellipsis;
            display:-webkit-box;
            -webkit-box-orient:vertical;
            -webkit-line-clamp:2;
        }
        .filePhoto.uploadImg, .filePhoto-show.uploadImg{
            height: auto;
        }
        .up-section{
            margin-bottom: 40px;
        }
    </style>
</head>
<body>
<!--添加编辑资讯弹窗-->
<form id="formID">
    <ul class="addList">
        <li>
            <label for=""><span class="require">*</span>申请时间：</label>
            <p class="dayBox"><input class="start_rise date start validate[required]" name="" type="text"></p>
        </li>
        <li>
            <label for=""><span class="require">*</span>企业名称：</label>
            <input class="validate[required]" name="" type="text" placeholder="请输入企业名称">
        </li>
        <li>
            <label for=""><span class="require">*</span>门店名称：</label>
            <input class="validate[required]" name="" type="text" placeholder="有效的手机号码">
        </li>
        <li>
            <label for=""><span class="require">*</span>商户账号：</label>
            <input class="validate[required]" name="" type="text" placeholder="有效的手机号码">
        </li>
        <li>
            <label for=""><span class="require">*</span>联系电话：</label>
            <input class="validate[required]" name="" type="text" placeholder="有效的手机号码">
        </li>
        <li>
            <label for=""><span class="require">*</span>审批状态：</label>
            <select class="selectpicker validate[required]">
                <option value="">请选择省</option>
                <option value="">重庆</option>
                <option value="">四川</option>
            </select>
        </li>
        <li>
            <label for=""><span class="require">*</span>申请详情：</label>
            <textarea class="validate[required] ph_txtAreaBg" name="" id="" style="padding: 10px;"></textarea>
        </li>
        <li>
            <label for=""><span class="require">*</span>不通过详情：</label>
            <textarea class="validate[required] ph_txtAreaBg" name="" id="" style="padding: 10px;"></textarea>
        </li>
        <li>
            <label for=""><span class="require">*</span>审批资料：</label>
            <div class="filePhoto uploadImg">
                <section class="fileBox left">
                    <img src="images/add.png" class="add-img">
                    <input type="file" name="file" id="file1" class="fileImg" value=""
                           multiple/>
                </section>
            </div>
        </li>
        <li class="clearfix">
            <label for="">备注：</label>
            <div class="left">
                <p>审批资料上传仅支持以下文件格式：</p>
                <p>图片：jpg、png、bmp、jpeg</p>
                <p>文档：doc、docx、xls、xlsx、pdf、ppt、pptx</p>
                <p>压缩包：rar、zip</p>
            </div>

        </li>
        <li>
            <label for=""><span class="require">*</span>审批额度：</label>
            <input class="validate[required]" name="" type="text" placeholder="有效的手机号码">
            <span style="display: inline-block; line-height: 40px;">/月</span>
        </li>
        <li>
            <label for=""><span class="require">*</span>审批说明：</label>
            <textarea class="validate[required] ph_txtAreaBg" name="" id="" style="padding: 10px;"></textarea>
        </li>
    </ul>
</form>
<!--end 添加编辑资讯弹窗-->
<div class="PopupBtn">
    <input class="submit" name="" value="保存" type="button">
    <input class="cancel" name="" value="取消" type="button" onclick="cancel();">
</div>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<!--bootstrap-select-->
<script type="text/javascript" src="js/bootstrapselect/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrapselect/bootstrap-select.js"></script>
<script type="text/javascript" src="js/bootstrapselect/select.js"></script>
<!--日期控件-->
<script type="text/javascript" src="js/datepicker/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="js/datepicker/jquery.timepicker.js"></script>
<script type="text/javascript" src="js/datepicker/jquery.datepair.js"></script>
<script type="text/javascript" src="js/datepicker/datepicker.js"></script>
<!--验证-->
<script type="text/javascript" src="js/validat/jquery.validationEngine-zh_CN.js"></script>
<script type="text/javascript" src="js/validat/jquery.validationEngine.js"></script>
<!--图片上传-->
<script type="text/javascript" src="js/imgUp_new.js"></script>
<!--分页-->
<script type="text/javascript" src="js/pages/jquery.dataTables.min.js"></script>
<!--弹窗-->
<script type="text/javascript" src="js/layer/layer.js"></script>
<!--图片点击放大-->
<script src="js/viewer/viewer-jquery.min.js"></script>

<script type="text/javascript">
    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
    //关闭iframe
    var json=[
        {
            "url": "1.pdf",    //带type参数的图片
            "name": "11111.pdf",
            "type": 1
        },
        {
            "url": "1.ppt",    //不带type参数的老数据（一般都是图片）
            "name": "1asdasdadsadsads1111.ppt",
            "type":1
        },
        {
            "url": "1.xls",    //带type参数的压缩文件
            "name": "1asdasdadsadsads1111.xls",
            "type": 1
        },
        {
            "url": "1.doc",    //带type参数的文档文件
            "name": "1asdasdadsadsads1111.doc",
            "type": 1
        },
        {
            "url": "1.rar",    //带type参数的文档文件
            "name": "1asdasdadsadsads1111.rar",
            "type": 1
        },
        {
            "url": "http://ou1om7vvj.bkt.clouddn.com/1503467426727.png",    //带type参数的文档文件
            "name": "1asdasdadsadsads1111.png",
            "type": 0
        }

    ]; //测试模拟数据
    init_File(json,1,'icoico');//回显数据
    function cancel() {
        layer.confirm('是否放弃本次编辑，不对数据进行保存?', {
            icon: 3,
            btn: ['确定', '返回'],
            btnAlign: 'c',
            closeBtn: 0,
            btn1: function () {
                parent.layer.close(index);
                window.location.href = "jxf_agent_credit_quota.html";
            },
            btn2: function (index) {
                layer.close(index);
            }
        });
    }

    $(function () {
        $("#formID").validationEngine({
            addPromptClass: 'formError-text',
            showArrow: false,
            promptPosition: 'bottomLeft:10 0'
        });
        //图片上传
        $("#file1").takungaeImgup({
            formData: {
                'module': 'product',
                'name': 'url',
                'filesname': 'urlfile'
            },
            url: 'data/files.json',
            maxImage: 20,
            isFiles:true,//支持文件上传：true 多格式文件上传，false 仅支持图片上传
            success: function (data) {

            },
            error: function (err) {
                layer.alert(err, {icon: 2, btnAlign: 'c', closeBtn: 0});
            }
        });
    });
</script>
</body>
</html>